<?php
	/******************************
	Ada Chambers all rights reserved
	******************************/
	$cnt=0;
	/*********************************
	problem 1...
	*********************************/
	class Good{
		var $name;
		var $rest;
		var $price;
		function __construct( $p1, $p2,$p3){
			$this->name=$p1;
			$this->rest=$p2;
			$this->price=$p3;
		}
		function instoring(){
			$rest++;
		}
		function outstoring(){
			$rest--;
		}
	}
	class Shoes extends Good{
		var $accountRate;
		var $accountPrice;
	}
	/*********************************
	problem 2...
	*********************************/
	class Fun
	{
		function fun1(){
			echo "fun1"."<br>";
		}
		function fun2(){
			echo "fun2"."<br>";
		}
		function fun3(){
			echo "fun3"."<br>";
		}
		function fun4(){
			echo "fun4"."<br>";
		}
	}
	class MyFun extends Fun{
		function fun1(){
			echo "I don't know what to do...<br>";
		}
		function fun2(){
			echo "fun2"."<br>";
			echo "I don't know what to add...<br>";
		}
		function fun3(){
			;
		}
	}
	
	/*********************************
	problem 3...
	*********************************/
	interface Shape{
		public function size();
		public function volum();
		public function shape();
	}
	class point implements Shape{
		var $x;
		var $y;
		function size(){return 0;}
		function volum(){return 0;}
		function shape(){return "point";}
		function display(){
			echo $this->x." ".$this->y."<br>";
		}
		function __construct( $xx, $yy){
			$this->x=$xx;
			$this->y=$yy;
		}
	}
	class circle extends point {
		var $r;
		function size(){
			return $this->r*$this->r*asin(1.0)*2;
		}
		function volum(){
			return 0;
		}
		function shape(){
			return "circle";
		}
		function display(){
			echo $this->x." ".$this->$y." ".$this->r."<br>";
		}
		function __construct( $xx, $yy, $rr){
			$this->x=$xx;
			$this->y=$yy;
			$this->r=$rr;
		}
	}
	class cylinder extends circle{
		var $h;
		function volum(){
			return $this->r*$this->r*asin(1.0)*2*$this->h;
		}
		function shape(){
			return "cylinder";
		}
		function display(){
			echo $this->x." ".$this->y." ".$this->r." ".$this->h."<br>";		
		}
		function __construct( $xx, $yy, $rr, $hh){
			$this->x=$xx;
			$this->y=$yy;
			$this->r=$rr;
			$this->h=$hh;
		}
	}
	$cylinder1=new cylinder(0,0,1,1);
	echo $cylinder1->shape()." ".$cylinder1->volum();
?>